import request from '@/utils/request'
import {deleteRole} from "@/api/system/role";

/**
 * 查询所有部门
 * @returns {*}
 */
export function listDept (queryParams) {
  return request({
    url: '/sysdept/listAll',
    method: 'post',
    data:queryParams

  })
}

/**
 * 添加部门
 * @param data
 * @returns {*}
 */
export function addDept (data) {
  return request({
    url: '/sysdept/add',
    method: 'post',
    data:data

  })
}

/**
 * 删除部门
 * @param did 主键
 * @returns {*}
 */

export function deleteDept (did) {
  return request({
    url: '/sysdept/removeById?did='+did,
    method: 'get',


  })
}

/**
 * 修改部门
 * @param data
 * @returns {*}
 */
export function updateDept (data) {
  return request({
    url: '/sysdept/edit',
    method: 'post',
    data:data

  })
}

/**
 * 根据id查询部门
 * @param did
 * @returns {*}
 */
export function getDept (did) {
  return request({
    url: '/sysdept/getInfo?did='+did,
    method: 'get',


  })
}
